package exsun.jt808.data.media.operate.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class MapUtil {
	public static List<?> getByLikeKey(Map<String, ?> map, String keyLike) {
		List<Object> list = new ArrayList<Object>();
		for (Map.Entry<String, ?> entity : map.entrySet()) {
			if (entity.getKey().indexOf(keyLike) > -1) {
				list.add(entity.getValue());
			}
		}
		return list;
	}

	public static List<?> getKeyByLikeKey(Map<String, ?> map, String keyLike) {
		List<Object> list = new ArrayList<Object>();
		for (Map.Entry<String, ?> entity : map.entrySet()) {
			if (entity.getKey().indexOf(keyLike) > -1) {
				list.add(entity.getKey());
			}
		}
		return list;
	}
}
